package cn.bonoon.kernel.expression.resolver;

import cn.bonoon.kernel.expression.ExpressionParseContext;
import cn.bonoon.kernel.expression.results.UserExpressionValue;

public class UserExpressionResolver extends AbstractExpressionPropertyResolver{
	
	UserExpressionResolver(){
		super("USER");
	}
	
	@Override
	protected boolean internalResolver(ExpressionParseContext context, String[] commands) throws Exception {
		String field = commands[1], args = null;
		if(commands.length > 2){
			args = commands[2];
		}
		context.value(new UserExpressionValue(context, field, args));
		return super.internalResolver(context, commands);
	}
}
